<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=utf-8"%>
<%@ page import="shopping.Goods"%>
<%@ page import="shopping.Action"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>My JSP 'account.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<%--添加并有改动--%>
<link href="css/account_style.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="js/lhgcore.js"></script>
<script type="text/javascript" src="js/lhgdialog.js"></script>
<script type="text/javascript">
	
</script>
</head>
<%--修改 --%>
<div class="heading">
	<center>
		<h3>购物车</h3>
	</center>
</div>

<div class="shopreturn">
	<h4>
		<a href="showgoods.jsp?">返回商品页</a>
	</h4>
</div>
<div class="heading0">
	<h4>
		<a href="enter.jsp?">退出登录！</a>
	</h4>
</div>

<br />
<div class="body_shopping">
	<form action="">
		<table class="product_table">

			<tr>
				<th>商品图片</th>
				<th>商品名称</th>
				<th>商品单价</th>
				<th>商品数量</th>
				<th>删除商品</th>
			</tr>
			<!-- 循环的开始 -->
			<%
				Action action = new Action();
				if (Action.arr != null && Action.arr.size() > 0) {
					for (int i = 0; i < Action.arr.size(); i++) {
						Goods good = Action.arr.get(i);
			%>
			<tr class="product">
				<td class="product_picture"><img
					src="picture/<%=good.getPicture()%>" width="200" height="160"
					border="1" /></td>
				<td class="product_name"><%=good.getName()%></td>
				<td class="product_price"><%=good.getPrice()%>
				<td class="product_amount"><%=good.getAmount()%>
				<td><input type="image" src="picture/27.png"
					onClick="window.location.href='Remove.jsp?id=<%=good.getNum()%>'"
					width="101px" height="41px" /></td>
			</tr>
			<%
				}
			%>
			<%
				}
			%>

			<!--循环的结束-->



		</table>
		<br />


		<div class="s">
			<span id="total">总计：￥<%=action.totalPrice()%></span>
		</div>
		<div class="cat">
			<img src="picture/24.jpg" width="200" height="200" border="1" />
		</div>
		<div class="buy2">
			<a href="success.jsp"><img src="picture/31.jpg" width="100px"
				height="40px"></a>
		</div>
		<div class="buy1">
			<a href="failure.jsp"><img src="picture/32.jpg" width="100px"
				height="40px"></a>
		</div>



	</form>
</div>
<div class="footing"></div>
</body>
</html>
